Tasks 2-6 from 7.11