updated the unit tests ofr bugs found before