better api design