added a callback hook to notify when actions are completed