input correction

still contains a side effect