Finished hot goal detection code