added lock_priority but buggy