fixing undefined for using node