add some of the uncommented code back

Change-Id: Ica3f2c597ac235b59a4e1c9d3ea99973e129db0b