better input handling, hopefully?