almost finished fixing broken tests