added condition parsing