Ah - sorry - i missed that the ending brace(s) were way down at the end of the file; thought it closed before the script.