recalculating conditions