rough implementation of a qstat() function
+test to ensure qstat is callable