working on database connection