Updated to use a better input method