code refactoring

Change-Id: I5e96b72cc8ac3a714ab728c1c362963000919d79