looping, methods and recursion examples