problem three is working with sample solution