Hi,
If you want helpful answer you might want to ask precise questions (what is the error you have, what is happening that you did not expect, etc) and point to particular places in your code.
Also you can format you code nicely by adding ``` before and after it.