added duration calculation to the use cases