changed img_data to vector