updated for cowboy 1.0.0