Solved 5a and 5b