changed approach, now using some kind of skip table