added max-height code