reworking modules
changes since last attempt