some refactoring, nothing important...