understanding functions and procedures