fixed trimPhone function