converted to use angular.module