updated API structure to fit with angular model