moves condition into variable