some refactoring + attributes