Adjusting controller js