slight optimization changing map to vector for partition