Refacotred to make the code easier to read, fixed the 'does't run' bug