small refactoring to be java conform