made createQuery() config param optional