start using $resources instead of direct $http