add custom getters to cast()