improved command option handling