fixed variable to get script extension as well
changed aesthetics and now fetches datatable list