building db settings functionality