refactored heightsView to class