Updated parse logic