updated test and doc for when