code refactoring

Change-Id: I8b3675ee8d3fc399d123a6e4b4ef72ecde5fa831