add fuction to fwd and bck