pla: enhanced terminal rewritten