change leg to array