poolpaper - C3 algorithm