add test and docs