copied pytables stuff
merge