add asType to WriteResponse, create iterator tool

address #11 and #12