moved things around to use a module system