recursive directive
non functionals bit hacky