added function to send queries to database also started working on database connection