classes refactor