Add x and xs API - #82
Update sample for custom x
Fix x/xs API