errors in sun_path code