apparently undefined is not a function. who knew?