simplified lock detection