refactored order of methods