Undoped and Pd-doped SnO2 thin films for gas sensors