fixed and upgraded commander script