Added single-end mode