added touchscreen and some flow of control code