added collision controling