write a class