refactor and features