get rid of snprintf and strncat