added support for mouse and touch