refactoring to use exports properly