added more structure to API