modified script to remove sorting