fixed database class