james | added support to duration for ongoing visits