adding event listener and print devices