added cmd options and init