complete challenge 3 and 4

Signed-off-by: Connie Leung <cleung334@gmail.com>