some code contracts adjustments