Refactor - factorize behaviour.