added query to scripts