Add read_request function