initial class and common functions
DB manipulation class