added duration support

Fixes #125