updated usage to include optional callbacks