smooth the path