add test and update API call + domain structure
Merge pull request #5 from peeratham/master

add test and update API call + domain structure