database almost fixed