added basic lock implementation
so...it's locking up but that's cool
still freezes and stuff