older utility functions used for my packages dyngame and repgame