use height input in optimization