moved a function to the module