changed dirichlettransform to not loose any information