Added single-shot functionality.