add type augmentation and recursion