made functional tests pass