worked on build_hash method