illustrating the functions for ex. 02 and 03