adding proc struct with loop