deleted change_bin and created a simpler function change_data that does most of the same