fix equation for closing beta
add solution for forward and backward