refactoring + add object attributes