added test and docs. related to #5