close #50
#35 #36 add test for return value
close #37