add comment, modify main loop demostrate