would it be too big a pain to put each branch in its own method? This is getting pretty long.