An example of a program code with recurssive method