factorial without optimizing prev calc