added in another variable minheight to see what results