cleaning by maxentscore where possible