Working code for day 4