add test and documentation