switched back to arrays and added missing Serializable interface