added variable height and pagination hack