better api structure