change to work with express 4 according to https://gist.github.com/jeffscottward/10419517