refactored measurementView to be more efficient