This line needs to be at module scope. With it here, you're recalculating the value every time.