created index && updates __dirname in routes