added hint for factorial