edit functionality list - javascript