refactoring to browser