modo1&2 ok, modo 3 error global name'lat' not defined line 57