added flow diagram fig from paper