implement wrapper for Hash function