refactor claims showHide code