added defining functions in functions section