apply changes graph A -> B