il codice che hai postato è regolare, il problema non è li