COM2 code seems to be doing things but is slow