adding init command support
fixing minor issues to add init command support