add hashes fun for add and update except showing i will do it, and fixed some bugs