updated for SGE