Added detect collision function
made dots unscrollable