split class down a bit, for modularity