added 1-4 from hw5