refactored to remove use and replace with require, specifying functions needed