+attribute and refactor some classes