adding code from day 2 assignment