work in progress on input handling