moved nodename function to separate module. removed leftover console.log