dynamic getters for structs