Calling a function inside other function

I still don’t really understand what you’re after, so I can’t really give suggestions for alternatives.