options parsing improvement