solved coursework of Lab 5