implemented basic locking, added basic incomplete test