refactor order of methods