Issue #6: implement Gabriel's suggestion