Better way to parse list