js functions now working as expected

click now add item to the list on each click