added basic callback function code