add methos to work with the angularjs app