writting class