optimize with constant values