restored  final version