add pseudodb
improve interfaces and sort index