some minor changes to pre/post conditions.