moved misplaced function to correct module