added read and write queries
more updates