put all relevant code in a class