add support for patch

address #7