Added sample function and tests
Released 0.3.1