Define variable before reference