Write method related code