added factorial assigment with recursion and loop