more changes to structure and fix for cog data.frames