splitting index into index and footer