Build the path with the correct method