Implemented function definition at the beginning of each program