added logic to detect if single minute