added callback argument to cli