improve option handling.