console.log now working with queries to the database