Update interviewformgenerator.R

Removed the duplication of the loop, made into one function