some "designing", some refactoring