finally got index page working