fixed parsing so options can be in any order