added collision avoiding