fixes done and tests