added collision with planes