writing cluster wrapper