lock implemented
final fix