Resolve #8
Hasn't been thoroughly tested