fixed indexing issue with main driver