fixed issue 5 where duration returned the wrong value instead of the sum