adding the optimize flag to fix issue #7