detect unlock