refactore some features