change max_name_length to global variable
change prettyName function