simplified get options logic
fixed compilation