use strncpy() to copy into a limited buffer