Calling a function inside other function

i havent used processes for now. Will use in future modification.