More queries and validation added