Logic for key and lock included

^^^^^^