added cmdln options parsing and versioning