Added more arguments and made SGE compatible