unecessary subshells cleanup
sed cleanup use tr instead for single character