did a little refactoring, still getting the hang of this module business