`hash` is a built-in function, consider renaming to something that doesn't conflict.