updated and fixed tests