added logic to persist requests