Reworked code, added missing step 5.