finished implementation for issue #84