remove duplicate code

Change-Id: I722a9359a5468ce49f9a1590833ae5cce75ffda1