refactoring (will use branch)