fixed bug in combining all data