Use the helper function to get results, and simplified the code slightly.
Added modify example.