add plugin support, fixes #1