added command line parser and db init