add sorting part in GPU optimization section