darn recursion, modified some programs but still getting an incorrect result