working for all cases except hashes on same grid