flattened and combined some of the getter/setter logic