broke up lib/server.js