Text this: Resource allocation in cognitive radio network with energy harvesting