ap links and rp link refactoring