reworked to support objects like array elements