corrected tests and a few other changes