Dynamic resource allocation in heterogeneous networks