all tests passed, wrote toString and hasElements