Providing a working solution to the assignment