fixed issue

Implemented duration() method in Rest