added database connection, base case, index page