added some sql queries