using resources and promises | frontend