added dynamic type query