fixing test and adding documentation