renamed db to database, make connection available through getter only