added factorial example.