added back end functionality for comments