remove unused PrintProfiler snippet
use sorted() instead of list.sort()