added more tests but not found bugs 3 or 4 yet