added output repeat ability