changed options parsing