putting it into a class