refactor DB manipulation, use property file