Upgrade of some function to have better result