fixed all testing bugs and errors almost