adding callbacks and removed CORS