add test and implementation