fix measles condition and add tests