change algorithms import scheme, add forward_backward wrapper