refactor and show result