Added -pg flag for measuring time