Implemented custom hash option, added tests