adding pre/post conditions and contracts