trying to write two arrays to db