whitespace
moved ugly logic into new class