better indentation, perhaps
check number of letters before taking a substring
fix the line sent to graphite