added back checks for validity