modify swap function
modify zero data to None data in temp array