moved thing factory out of server and made test