minor change to the touch function to first check unit and then check for tile.