re-factor code into explicitly named method