added a flag to keep track of the home team