calculating times of each part; added parallel version with indices