major changes to PID locking, working well now
updates to PID locking