optimized input method

took like 20 lines of code off cause i'm dumb