in reply to calling function with function

... I have written a program...

No you haven't. Because if you did, you would know how to write an new subroutine which does what you want.

Paul