hash implementation improved
more tests