added a class as selector for click event and modified the way we get the needed list