refactoring: moved out definitions