Changed zip and sorted. Added comments.