used $injector to get $http instance