Moved struct definition outside of the func.