switched from modules to classes