Implemented collision and speed change