added __with__ function according to proposed syntax in issue #29