modified code to run on only gen content