Updating samani code

pull request by az