trying to fix overflow problem