Please use code-tags when posting code rather than plain-text. Note that you can also edit your post for this too.
You don’t state what is actually wrong. You also don’t post the whole script as the final “}” of the class is missing which is suspicious.
Thanks.