Recursion removed because of stackoverflow