create hash for objects