change layouts and update index view