added code to simulate characters