introduce resource module for co-ordinating db activities and first api call using this resource