added switch for onsite/offsite