implementing lock interface