convert testing to Quickcheck with correct test generator