organize code，and move database path