Added switch statement to get execution timing