add feature generation logic