updated documentation and added from array method