implemented and bug-checked all but CLS lock