added a proper input method instead of just space delimited