cleaned up api structure