need to clean this stuff up.. also need to use quickcheck instead of hunit & add criterion benchmarks