cleaned up the merit code hack per the suggestions of tute