remove duplicate code

Change-Id: I3fb0778c952ac24db5bee12f0cd66543b60f6184