moved comparray property from state to funct object