HOW TO WRITE THE LOCK FOR DRIVER