Switched back to readMode, improved solution