merging
update code to work with pandas table