added better type testing in qloader