switched to callback approach instead of passing objects