first try for problem 4