factorial with prog, go and return