init
working version, with test coverage
enh: updated doc