update feature and small refactoring