added class for handeling the db