adding hash grid imagE
main changes
main fix, split out into two functions