handle options in proper sequence