refactored some functions

added a new callback option if toast is disabled