Code from day 4.