Switched to using library function.  Way faster now.