improved value class in order to handle arrays