custom api based on prototype