Adding SAM support