rewritten hash put and hash get