remove duplicate code

Change-Id: I24b10363696988284fdbdae6f41f4f2bf5da42c4