Updated factorial code to pass return 1 when 1 test