make callback function standalone.