put back changes I accidently removed, fix tests