added better handling for cells, converts ids to ints