sample script using createQuery