having trouble with jsonify middleware