parseListToArray method updated,