improvements at handling incoming chemicals and passing forward control flow