nested properties set code simplified