refactored retrieve_statement and req_process