now server is chainable, and add route function