remove the non-generator code from view