Committing solution to Ex.8