add .data() function. cleaned up PR #221, added tests, updated readme