small refactoring of var name x to n to better suggest that we deal with natural numbers here