fixed to account for nested struct fields