Adding changes to support callbacks