Draft 2

Corrected code - it now works as intended