modified api structure, improved api directive