switch to using Medium lib for input