Added factorial and Ackermann functions