put functions into a class to make it more modular