semi-working version of PMTLM