Added Conditional Logic