refactoring
refactoring: sorting functions in expected execution order