added some code-contracts