added test and updated documentation