Finish hw4 basic