callbacks and persistence and api