added code for printing i to screen