taking into account changing the same parameter for an object array