Scientists 'solve' the ketchup problem