saving array correctly on the mongodb