Created class for problem 004