fixed code to include real callback functions
code cleanup after make scgt code check