refactoring angular watch