rewrote factorial method to use recursion