added collision avoid

based on NewPing