Updated to handle list item click