PE78 solved - algorithm improved 3