Can you add a short comment to the file explaining what is happening here (line 49-61,64)? Thanks!