added query script