put collapse.singles(timeSliceTree()) inside an if() statement so that this time consuming step is not attempted unless we're actually examining a point in time prior to simulation's end