Variable needs to be moved above functions