ok the distribute function can work now