homework 4 including basic and intermediate