Added code and sample usage.