refactored retrieve_statement and req_process
Merge pull request #213 from ljwolford/bugs

refactored retrieve_statement and req_process