moved the methods into a class