replace terrible string of pipes w/built-in string functionality