committing solution 3-5