copied previous factorial code, needs modification