refacto for testing purpose

Change-Id: Id0d64997a9563be56fdd73e6b7b6e9da7fc51c22