code style
document the algorithm - fixes #10
1.0.1