finally fixed copy ctor wasnt passing by ref properly