added input options parsing