added a factorial component to lab 7