Condition

Added criteria that stops after a certain number of iterations
Fixed conflicts