problem with array reference -> add deepCopy js library to save some time