adding javascript to manipulate the list