added options parsing