removed unnecessary path calculation