after looking through the code, managed to spot the issue so after some trial and error I've sorted it and made some illustrated instructions