swap n for p and peb-encode manual updated