change add device api
Merge pull request #8 from michaelfung/master

change add device api