unit tests for forward. Many typo bugs are fixed.
unit_tests on update_w