Problem 2 done with callback function this time