optimize string processing; running time of mapper reduced by half