tweak forward and bwd funcitons