Final code for day 3 of Hack Week