Adding functionality to append terminator if necessary to input.