fix retrieve
almost done with hash