switching unlock to finally