Add ctt and qsub functions