added input support for GUI