adding ngResource
replacing out get request with ngResource