Worked on query saving structure