some code refactoring (nothing special)