add condition interface
fix lock interface
finalize condition interface