using ngResource instead of my own wheel