refactor some features