updated panel renderer to consider height too