adapted the length and height