modified callback functions