refactor factorial bubunwa