remove duplicate code

Change-Id: I6f3c446ac256961813e56aa8c3896ea2ea0f6ee1