refactor parse method to account for nil attrs and move output container into method