Made the changes to run on SGE