incorporating new api changes: save state from envelope, use match boolean, use refreshTimer