added input handle

improved handling of input so that main update loop can control  the
input.