Modified to allow for extended paths