Tested callback and added example for a function def