Added begin,process,end blocks for the function definition