complete problem 4 & create test