parse_cond() added & add some tests