moved index to layout