codestyle and refactoring