It's very important to have static value, otherwise I will either get segamentation error because i was not initialized or i got reset to zero everytime the recursive function is called