L'hai messa l'ultima parentesi graffa?
Mi sa che te ne manca una per chiudere la funzione