replaced extractValue with Expression::take()