improvements for testing; handling of arrays