Added function for API Simulation