Added lock query capability