updated functions and create_pbs script