update api to support express4