updates, refactoring