trying to get factorial to typecheck and compile