Refactor called logic