code for a class