updates in javascript to match the changes in the views