remove the temp file
seperate the factorial method to new class + modified yield block