break up into methods