fixes misplaced function