added new attributes, refactoring