factorial without recursive