added type checking and cleaned a little bit for submission script

cleaned up submit script