add re-lock function