almost working, refactoring callbacks
refactored callbacks
fixed callback bug, was registering non-existent callback