express implementation of @f25138c8b88855061aee1c31ea292fa657f25f8b