Added Daniel's code for SNS