updating query director code