this looks wrong, it should be also elsif and in else raise exception with internal error that we forget some option.