[updated] factored out full path computation