code contract and code format changes