moved required module to the one function that acutally uses it