Update to use class approach