prepare to implement forwardbackward.