finished fixing tests and implementation; now all test scenarios pass