add hash
add missing cast
fix debug and format everything
Merge pull request #104 from IGI-111/hash

Hash