Added code for subset2 until single if