added codes for subset4