remove duplicate code

Change-Id: I09a180e2897590aaf67630eb5ca31f499cdf6903