Issue #1: changed to use Array sort method