moved shared stuff into the module