added wait flag. fixes #1
v0.2.0