Refactor the perfome method