lock implemented