Added the path drawing function