refactoring callbacks
cleaning up demo