first draft of namev.c function implementation