Adding better logic.