add homework 4

low efficiency