working uncommented version

to do:
1. better hash function with relatively prime key
2. decoder
3. comments
4. warnings