fixed error in factorial example