add lockfun for dev