add utils and test

Signed-off-by: Pin Xie <pxie@vmware.com>