added touch event and tweaked border collision