type safety

Change-Id: Ied927332dd63c3d127fa410f7a95e02dac7ba8ca