updates index and styles