full version of clean data assignment