euler8 old//new. new is much more readable but a few ms slower