very simple lib and sample, but works well