WIP of dealing with several locks and conditions