renamed db to database to fit coding guidelines (vars have to be >= 3 chars)