getComments function