attempted to impl recursive fn ..