changed to using calculated duration from end time as daily duration is not always correct.