made into a module, updated storage of attributes