using locks for parallel