it's a mess, but breaking things out into separate classes