improved performance, #9

in response to Issue #9