code refactor
new database