added code for comment functionality