first version reading pre-computed cogs