scan() populates given struct