refactored to use angular-route