add reference, todo reference in loop and other statements