Sorted like shown by lecturer