writing the middle part