add some legacy codes
add some dependencies
add legacy codes and database design