removed dependency on ngResource