todo

added $key—;
Functions

Step 1
Functions

Step 2 - 5.