fixing module export and returning a value