trying using conditional lock