Refactoring code

Mini fix with hash