fix #3 by adding Sample() functionality

@gkristic, want to look over this and tell me what you think? Barron has ok'd the API, but he wanted me to have some else look at it just to check.