finished implementing and testing issue #84