added generate_permalinks for class