fixed command mode, rewrote getPTS functions