height calculations added as well as search changed to a window