added print loop