remove the callback function design, it is full of bugs