inital code of mixed pattern cleanup is done!