@uli: Yeah took me to find out that there are brackets behind the if statement, and I also like it more in the next line

I would also try to move the function main to the bottom, but I dunno why it should caus a "Missing {" error