fixed tests; fixed code that tests were testing; comments