Implement 4th exercise