expose state as a module.  i know the naming isn't consistent.  fix it later