fixed to array converting, made data property optional and adjusted tests