modified the source code for Problem 2