Ecco il problema, il return era fuori dalla funzione ehheheeh