merge with kostya copy