wrote and tweaked  tests