improved plt generation