class writting