fixed database and add class