changed function parameter to expect string, not array
changed asort to sort