refactorization
minor enhancements
doc for options